package com.kcht.itsed.mws.commmodel;

/**
 * 规则标识
 * @author 张文硕
 *
 */
public class SpecId {
	
	public final static String EC = "EC";
	public final static String CC = "CC";
	
	private String specType;	//EC/CC
	private String specName;	//规则名称
	public String getSpecType() {
		return specType;
	}
	public void setSpecType(String specType) {
		this.specType = specType;
	}
	public String getSpecName() {
		return specName;
	}
	public void setSpecName(String specName) {
		this.specName = specName;
	}
	
	public SpecId(String specType, String specName) {
		this.specType = specType;
		this.specName = specName;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((specName == null) ? 0 : specName.hashCode());
		result = prime * result
				+ ((specType == null) ? 0 : specType.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SpecId other = (SpecId) obj;
		if (specName == null) {
			if (other.specName != null)
				return false;
		} else if (!specName.equals(other.specName))
			return false;
		if (specType == null) {
			if (other.specType != null)
				return false;
		} else if (!specType.equals(other.specType))
			return false;
		return true;
	}
	
	
}
